package com.bloveoacom.weichi.model;


import com.bloveoacom.base.UserInfoBean;
import com.bloveoacom.http.HttpMethods;
import com.bloveoacom.http.HttpResult;
import com.bloveoacom.weichi.bean.CommentBean;
import com.bloveoacom.weichi.bean.RewardBean;
import com.bloveoacom.weichi.contract.AllCommentContract;

import io.reactivex.Flowable;

/**
 * author: zhu.px
 * e-mail: 1271901673@qq.com
 * time  : 2018/8/22
 * desc  : 我的
 */
public class AllCommentModel implements AllCommentContract.Model {



    @Override
    public void onDestroy() {

    }

    @Override
    public Flowable<HttpResult<CommentBean>> getCommentAllList(int pageNum, int pageSize, String commentId) {
        return HttpMethods.getInstance().getHttpService().getCommentAllList(UserInfoBean.getInstance().getToken(), pageNum,pageSize, commentId, "0");
    }

    @Override
    public Flowable<HttpResult<RewardBean>> comment(String coinId, String replyCommentId, String replyUserId, String type, String content, String sign) {
        return HttpMethods.getInstance().getHttpService().comment(UserInfoBean.getInstance().getToken(),coinId,content,replyUserId,type,replyCommentId,sign);
    }

    @Override
    public Flowable<HttpResult<Object>> findTimeStamp() {
        return HttpMethods.getInstance().getHttpService().findTimeStamp(UserInfoBean.getInstance().getToken());

    }

    @Override
    public Flowable<HttpResult<Object>> fenpeiEmt(String coind,String overType) {
        return HttpMethods.getInstance().getHttpService().fenpeiEmt(coind,overType);
    }
}
